import Vue from 'vue'
import 'lib-flexible'
import moment from "moment";
import VueCookies from 'vue-cookies'
import VueLazyload  from 'vue-lazyload'
import App from './App.vue'
import router from "@/router/router";
import Header from "./components/Header/Header";
import store from "./vuex/store";
import {Button} from "mint-ui";
import './mock/mockServer'
import loading from '@/common/images/loading.gif'
//注册全局组件
Vue.component('Header',Header)
Vue.component(Button.name, Button);
Vue.config.productionTip = false
Vue.use(VueCookies)
Vue.use(VueLazyload, {
  preLoad: 1.3,
  loading: loading,
  attempt: 1
})
Vue.filter('timeFilter',function (value) {
        return moment(value).format('YYYY-MM-DD HH:mm:ss')
})
// router.beforeEach((to,from,next)=>{
//   console.log(111)
//   next()
// })
new Vue({
  render: h => h(App),
  router,
  store,//所有组件都能看到$store
}).$mount('#app')
